# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: Maxim Karasev <begs@disroot.org>
pkgname=hut
pkgver=0.1.0
pkgrel=2
pkgdesc="command-line tool for sr.ht"
url="https://sr.ht/~emersion/hut"
arch="all"
license="AGPL-3.0-only"
makedepends="go scdoc"
subpackages="$pkgname-doc
	$pkgname-zsh-completion
	$pkgname-bash-completion
	$pkgname-fish-completion"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/hut/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	make all
}

check() {
	go test ./...
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr \
		FISHCOMPDIR=/usr/share/fish/completions install
}

sha512sums="
ea67234c50846baafbb29123d333b9ebfdc0ef0923f00f374078b7fdb49eafa2441172e58dd88a90fa9bc987d3d44167a540369cc80f37df0bda8df92730932a  hut-0.1.0.tar.gz
"
